//
//  BCSArray.swift
//  BCFoundation
//
//  Created by Basic on 2020/11/13.
//  数组扩展

import Foundation

public extension Array {
    
    /// 数组转字符串
    /// - Returns: 字符串
    func bc_toJsonString() -> String? {
        guard let data = try? JSONSerialization.data(withJSONObject: self, options: []) else {
            return nil
        }
        guard let str = String(data: data, encoding: .utf8) else {
            return nil
        }
        return str
     }
}
